<?php

class PaycodeModel extends Model{
	
	protected $trueTableName = "csl_paycode";//主表
	protected $subTableName  = 'csl_user';//副表
	
	
	function getlist(){
		$subtable = $this->subTableName;
		$code = $this->select(false);
		$result = $this->table("$code a")->field("a.*,b.username,b.name")
					   ->join("$subtable b on a.uid = b.uid")
					   ->select();
		
		return $result;
	}
	
}

?>